<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>提现记录</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <script type="text/javascript" src="../script/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="../script/calendar.js"></script>
    <script type="text/javascript" src="../script/en.js"></script>

</head>

<body>
    <div style="text-align:center;margin:0.625rem;display:none;background:#fff;padding:1.25rem;" id="default-1">
        <img src="./img/muyou.png" style="display:inline;">
        <p><span style="font-size:1.25rem;">亲,</span>&nbsp;&nbsp;&nbsp;&nbsp;您当前木有记录</p>
    </div>
    <div style="padding:10px;">
        <div id="list">

        </div>
    </div>



</body>
<script type="text/template" id="template">
    {{~it:value:index}}
    <div class="aui-content" style="background:#fff;margin-top:5px;padding:5px 0;">
        <div class="aui-row">
            <div class="aui-col-xs-12" style="padding:5px 20px;text-align:left;">
              
                <div class="aui-row">
                    <div class="aui-col-xs-8">
                      <p><span style="color:#ff4285">账户:</span>{{= value.account}}</p>
                        <p><span style="color:#ff4285">提现时间：</span>{{= value.inputtime}}</p>
                        <p><span style="color:#ff4285">审核时间：</span>
  {{? typeof(value.check_time)}}
  待审核
    {{??}}
    {{=value.check_time}}
    {{?}}

                          </p>
                        <p><span style="color:#ff4285">原因：</span>  {{? typeof(value.cause)}}
                          等待审核
                            {{??}}
                              {{= value.cause}}
                            {{?}}

                            </p>
                    </div>
                    <div class="aui-col-xs-4">
                      <p><span style="color:green">金额:{{= value.money}}</span></p>
                        <p><span style="color:#ff4285">模式：</span>{{= value.paypal}}</p>
                        <p><span style="color:#ff4285">状态：</span>
                          {{? value.status==0 }}
                        待审核
                        {{?? value.status==-1}}
                        审核未通过
                        {{?? value.status==1}}
                        审核通过
                          {{?}}</p>
                        <p><span style="color:#ff4285">方式：</span>{{= value.type}}</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {{~}}
</script>

<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="./conf/config.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<script type="text/javascript" src="../script/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="../script/doT.min.js"></script>
<script type="text/javascript">
    apiready = function() {

        fnGetData();

    };

    function fnGetData(realName) {
        var userInfo = $api.getStorage("userInfo");
        var userid = userInfo.userid;
        var random = userInfo.random;

        api.ajax({
            url: SITE_URL + 'index.php?m=api&c=appnew&a=getusercashlog',
            method: 'get',
            data: {
                values: {
                    "userid": userid,
                    "random": random,
                }
            }
        }, function(ret, err) {
            if (ret.status == 1) {
                //把数据分配到前端模板
                fnUpData(ret);
            } else {
                alert(ret.msg);
            }

        });
    };
    //把数据分配到模板上面

    function fnUpData(ret) {
        if (ret.lists[0]) {
            var list = $api.byId('list'); //获取节点
            // 1. 编译模板函数
            var tempFn = doT.template($api.byId('template').innerHTML); //找到模板多次使用
            // 2. 多次使用模板函数
            var resultText = tempFn(ret.lists);
            $api.append(list, resultText);
        } else {
            $("#default-1").show();
        }

    }


    function fnOpenSheet() {
        api.actionSheet({
            title: '操作',

            buttons: ['修改']
        }, function(ret, err) {
            var index = ret.buttonIndex;
            fnEditAlipayBind();
        });

    }

    function fnEditAlipayBind() {
        api.openWin({
            name: 'edit_alipay_',
            url: './page1.html',
            pageParam: {
                name: 'test'
            }
        });

    }
</script>

</html>
